﻿using Microsoft.Extensions.Configuration;

namespace 自定义配置系统
{
    public static class ConfigExtension
    {
        public static IConfigurationRoot UseLmConfig(this IConfigurationBuilder builder)
        {
            var configBuilder = new ConfigurationBuilder();
            //管理机密配置信息
            configBuilder.AddUserSecrets<LmConfigSource>();

            configBuilder.Add(new LmConfigSource() { Path="appsetting.json" });
            return configBuilder.Build();
        }
    }
}
